package com.moli.iov.base.model.dto.req;

import com.baomidou.mybatisplus.annotation.TableField;
import com.moli.iov.base.model.UserOpDto;
import com.moli.iov.base.model.dto.res.VehicleFenceGpsResDto;
import java.util.Date;
import java.util.List;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

/**
 * @author whl
 */
@Data
public class VehicleFenceReqOpDto extends UserOpDto {

  @NotNull(message = "围栏Id不能为空", groups = {Update.class,
      Delete.class,})
  private Long id;

  /**
   * 围栏名称
   */
  @NotBlank(message = "请输入围栏名称", groups = {Save.class, Update.class})
  @Length(min = 5, message = "围栏名称应至少5个字符", groups = {Save.class,
      Update.class})
  @Length(max = 20, message = "围栏名称输入字符上限为20个字符", groups = {Save.class,
      Update.class})
  private String fenceName;
  /**
   * 围栏区域
   */
  @NotBlank(message = "请输入围栏区域", groups = {Save.class, Update.class})
  @Length(min = 6, message = "围栏区域应至少6个字符", groups = {Save.class,
      Update.class})
  private String fenceArea;
  /**
   * //围栏区域坐标（数据格式:[{"longitude": "116.46", "latitude": "39.92"}]）
   */
  @NotNull(message = "围栏地图坐标不能为空", groups = {Save.class,
      Update.class,})
  private VehicleFenceGpsResDto fenceAreaCoordinate;
  /**
   * CIRCLE(1, "圆"), SQUARE(2, "正方形"), POLYGON(3, "多边形");
   */
  @NotNull(message = "请输入围栏类型", groups = {Save.class})
  private Integer fenceShape;
  /**
   * 报警类型(0:进围栏报警,1:出围栏报警)
   */
  @NotNull(message = "请输入报警类型", groups = {Save.class, Update.class})
  private Integer alarmType;

  /**
   * 半径（距离）米
   */
  @NotNull
  private Double radius;

  public interface Save {

  }

  public interface Update {

  }
  /**
   * 删除
   */
  public interface Delete {

  }

}
